import request from '@/utils/request'

// 查询入住信息明细表
export function listOrder(query) {
  return request({
    url: '/checkInformationDetails/list',
    method: 'get',
    params: query
  })
}
// 分页查询入住信息明细列表
export function listOrderItemByPage(query) {
  return request({
    url: '/checkInformationDetails/page',
    method: 'get',
    params: query
  })
}
// 新增入住顾客缓存数据
export function addCustomer(data) {
  return request({
    url: '/checkInformationDetails/addCustomer',
    method: 'get',
    params: data
  })
}
// 新增预定顾客缓存数据
export function addReserveCustomer(data) {
  return request({
    url: '/reservation/addCustomer',
    method: 'get',
    params: data
  })
}
// 取消入住顾客数据
export function cancelAddcus(data) {
  return request({
    url: '/checkInformationDetails/cancelAddCustomer',
    method: 'post',
    data: data
  })
}
// 取消预定顾客数据
export function cancelAddReservecus(data) {
  return request({
    url: '/reservation/cancelAddCustomer',
    method: 'post',
    data: data
  })
}
// 办理入住
export function checkIn(data) {
  return request({
    url: '/checkInformationDetails/checkIn',
    method: 'get',
    params: data
  })
}
// 办理入住
export function reserveCheckin(data) {
  return request({
    url: '/reservation/checkInByReservation',
    method: 'get',
    params: data
  })
}
// 查询入住信息明细详细
export function getType(roomTypeId) {
  return request({
    url: '/checkInformationDetails/' + roomTypeId,
    method: 'get'
  })
}

// 新增入住信息明细
export function addType(data) {
  return request({
    url: '/checkInformationDetails',
    method: 'post',
    data: data
  })
}

// 修改入住信息明细
export function updateType(data) {
  return request({
    url: '/checkInformationDetails',
    method: 'put',
    data: data
  })
}

